Skip to content

feat(apps): opper apps — deploy and manage agents as managed apps#18

Merged
mattias-lundell merged 4 commits into
mainfrom
feat/apps
Jul 2, 2026
Merged

feat(apps): opper apps — deploy and manage agents as managed apps#18
mattias-lundell merged 4 commits into
mainfrom
feat/apps

Conversation

@mattias-lundell

@mattias-lundell mattias-lundell commented Jun 12, 2026

Copy link
Copy Markdown
Member

Adds the opper apps command group for Opper Apps (the deploy/Knative backend): agent source in, running app out, via task-api's /v3/apps surface.

opper apps list | get <name> | delete <name> [--yes]
opper apps create [--name n] [--dir . | --repo <git-url> [--ref branch|tag]] [--config json] [--wait]
opper apps redeploy <name> --dir . [--wait]
opper apps logs <name>                    # live SSE tail
opper apps shell <name>                   # interactive PTY in the running container
opper apps secrets list|set|delete <app> [KEY] [VALUE | --from-stdin | --from-file <path>]

Highlights

  • Deploy from a git repo: --repo shallow-clones and deploys — opper apps create --repo https://github.com/org/agent just works when the repo carries an opper.yaml.
  • Manifest-aware: --name is optional when the source's opper.yaml declares name: (fly.io-style config-as-code); template: / cpu / memory / disk / timeout / env also flow via the manifest.
  • CI-ready deploys: --wait polls the build to a terminal state and exits non-zero (DEPLOY_FAILED, exit 9) if it fails, so pipelines can gate on a green deploy.
  • Secrets stay off argv: secrets set reads the value from --from-stdin / --from-file, so it never lands in shell history or ps.
  • Safe delete: interactive confirmation, and a hard refusal in a non-TTY without --yes.
  • Interactive shell: opper apps shell opens a real PTY in the running container over the same authed proxy (ttyd/WebSocket) — no SSH, no cluster access.
  • Client additions: postMultipart (FormData upload) + streamGet (SSE-over-GET); new INVALID_ARGUMENT (exit 8) and DEPLOY_FAILED (exit 9) error codes.

Tested: 13 vitest cases for apps (full suite 382 green, tsc clean). Verified live end-to-end against prod (api.opper.ai) with the hello-agent example: create → set OPPER_API_KEY via --from-stdinredeploy --wait (building→running, exit 0) → run (real LLM answer) → delete --yes; delete without --yes correctly refused (exit 8).

🤖 Generated with Claude Code

mattias-lundell and others added 2 commits July 1, 2026 10:10
New `opper apps` command group against the /v3/apps surface (Opper
Apps — agent source in, running app out; the platform UI is a viewer,
the CLI is the creation path):

  opper apps list | get <name> | delete <name>
  opper apps create [--name n] [--dir .|--repo <git-url> [--ref r]]
                    [--config json]
  opper apps redeploy <name> --dir .
  opper apps logs <name>          # SSE tail
  opper apps run <name> --input "…"
  opper apps secrets list|set|delete <app> [KEY] [VALUE]

- create accepts a local directory (tarred with the system tar,
  excluding .git/node_modules/__pycache__/.venv) or a git URL that is
  shallow-cloned and deployed; --name is optional when the source's
  opper.yaml manifest declares one.
- OpperApi gains postMultipart (FormData upload) and streamGet
  (SSE-over-GET for logs), sharing the existing SSE parser.
- New INVALID_ARGUMENT error code (exit 8) for bad local input.

Verified live against the evroc deployment: list/get/run/secrets all
round-trip; `apps run hermes` answered through the new command.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
`opper apps shell <name>` opens a real PTY in the app's container over
the app's /run/shell WebSocket (the in-pod ttyd, proxied by the wrapper),
through the normal API-key-authed chain — no SSH, no cluster access. It
puts stdin in raw mode so Ctrl-C/Ctrl-D/arrows reach the remote shell,
forwards SIGWINCH as ttyd resize frames, and restores the terminal on
exit. Uses the `ws` client (Node 20 floor has no global WebSocket).

Verified against a ttyd-enabled image: connects, runs a command, streams
output back. Needs the deploy-side terminal (opper#2954) and the task-api
websocket proxy (opper#2955) deployed to work end to end.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
mattias-lundell and others added 2 commits July 1, 2026 11:44
… dead deploy_token

- create/redeploy gain --wait: poll the build to a terminal state and exit
  non-zero (DEPLOY_FAILED, exit 9) on failure so CI can gate on a green deploy
- secrets set reads the value from --from-stdin / --from-file, keeping it off
  argv and out of shell history; the positional value still works
- delete confirms interactively and refuses in a non-TTY without --yes
- drop the deploy_token branch: neither deploy nor task-api ever returns it

Verified live on prod (api.opper.ai) end-to-end with the hello-agent example:
create -> secret via stdin -> redeploy --wait (building->running, exit 0) ->
run -> delete --yes; delete without --yes refused (exit 8).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Thin wrapper over POST /v3/apps/<name>/run with naive {data}-shape output
and no streaming — create/get already print the invoke URL for curl/SDK.
Trims the surface; no dependency change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mattias-lundell
mattias-lundell merged commit 53166dd into main Jul 2, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant